/*
 * @Description: URL类型组件
 * @Author: ziwei.ma
 * @Date: 2019-06-26 16:27:47
 * @Last Modified by: ziwei.ma
 * @Last Modified time: 2019-06-27 17:06:02
 */

<template>
  <item-base
    :option="option"
    @click.native="jumpToUrl(option.URL,option.NEED_LOGIN)"
  >
  </item-base>

</template>

<script>
import { detectionGoToPage, goToPage } from '@/utils/JumpUtils'
import ItemBase from './ItemBase'
export default {
  components: {
    'item-base': ItemBase
  },
  props: {
    option: ''
  },
  data() {
    return {
    }
  },
  methods: {
    jumpToUrl(url, needLogin) {
      if (needLogin) {
        detectionGoToPage(url)
      } else {
        goToPage(url)
      }
    }
  },
  computed: {
    isLogin() {
      return this.$store.getters.loginStatus
    }
  }

}
</script>

<style scoped>
.list-icon {
  font-size: 40px;
  margin-right: 31px;
}
</style>
